]> dgit.raspbian.org Git - gnome-shell.git/commit
status: Ignore prior single-element lists updating input sources MRU
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 19 Sep 2022 20:35:15 +0000 (22:35 +0200)
committerMarge Bot <marge-bot@gnome.org>
Tue, 18 Oct 2022 18:38:27 +0000 (18:38 +0000)
commit9c262ad7bfe8d263946f2e81f4383d67b9a51b23
treef3e93c4455c4adcd27ea5bffe32b2d3f59cd6e84
parent022c64961c22afcfe865186b5e190a7c9446ff15
status: Ignore prior single-element lists updating input sources MRU

Consider the existing input sources MRU only valid if it contained
more than one element to pick from. Fixes the following situation
with initial-setup sessions:

- Initial setup Session starts, with several input sources already
  configured ("us" between them)
- InputSourceManager initializes, only the default "us" keymap is
  available
- MRU list is constructed, "us" is picked
- InputSourceManager catches up with session configuration, the
  other extra sources are added
- MRU list is reconstructed, "us" is already the most recent
- Session ends up with "us" picked, regardless of its position in
  the list, and no MRU existing prior to startup

If we consider the intermediate single-element MRU list invalid,
it is still possible to pick the best default source between all
the configured ones (the one that was put first in the list,
basically), after initialization is complete.

But also, it is unnecessary to have if there is a single source to
pick from. After the sources list has two elements or more, the
MRU list will become effective and preserved during changes to
the available sources.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5873
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2495>
js/ui/status/keyboard.js